//
// Created by Shao Wenhan on 2021/5/14.
//

#ifndef READLRPANDWRITERESULT_PARAMETERFORSOLVESTRATEGY_H
#define READLRPANDWRITERESULT_PARAMETERFORSOLVESTRATEGY_H

enum SolveStrategy{
    LocalSearch, ModelWithLocalSearch, HybridEvoAlgorithm
};

struct ParameterForSolveStrategy{
    SolveStrategy solveStrategy;
    int runNum;
    vector<int> inputRandomSeed;
    vector<unsigned int> realRandomSeed;

    ParameterForSolveStrategy() = default;
    string SolveStrategyToString() const{
        switch (solveStrategy) {
            case LocalSearch:
                return "LocalSearch";
            case ModelWithLocalSearch:
                return "ModelWithLocalSearch";
            case HybridEvoAlgorithm:
                return "HybridEvoAlgorithm";
            default:
                DLOG(ERROR) << "undefined solve strategy";
                exit(EXIT_FAILURE);
        }
    }
    void setSolveStrategy(const string &solveStrategyString) {
        if (solveStrategyString == "LocalSearch")
            solveStrategy = LocalSearch;
        else if (solveStrategyString == "ModelWithLocalSearch")
            solveStrategy = ModelWithLocalSearch;
        else if (solveStrategyString == "HybridEvoAlgorithm")
            solveStrategy = HybridEvoAlgorithm;
        else {
            DLOG(ERROR) << solveStrategyString << " is not a name of solve strategy";
            exit(EXIT_FAILURE);
        }
    }
};

#endif //READLRPANDWRITERESULT_PARAMETERFORSOLVESTRATEGY_H
